<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        * {
            margin: 0;
            padding: 0;
        }

        .box {
            margin: 0 auto;
            height: 50px;
            width: 640px;
            background-color: #ffc0cb;
        }

        li {
            list-style: none;
        }

        a {
            float: left;
            height: 50px;
            width: 80px;
            /* background-color: red; */
            text-align: center;
            line-height: 50px;
        }

        a {
            color: #fff;
            text-decoration: none;
        }

        .box ul li a:hover {
            background-color: #008000;
        }
    </style>
</head>

<body>
    <div class="nav">
        <div class="box">
            <ul>
                <li><a href="#">新闻</a></li>
                <li><a href="#">新闻</a></li>
                <li><a href="#">新闻</a></li>
                <li><a href="#">新闻</a></li>
                <li><a href="#">新闻</a></li>
                <li><a href="#">新闻</a></li>
                <li><a href="#">新闻</a></li>
                <li><a href="#">新闻</a></li>
            </ul>
        </div>
    </div>
</body>

</html>